package com.cd.demoboo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BooController {

    @Autowired
    FooFeignClient fooFeignClient;

    @RequestMapping("/boo")
    public String boo(){
        long start = System.currentTimeMillis();

        fooFeignClient.another();
        System.out.println("boo:boo called, call foo:another, total cost:" +
                        (System.currentTimeMillis() - start));
        return "boo";
    }
}
